home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Info-Mac 4
/
Info_Mac IV CD-ROM (Pacific HiTech Inc.)(August 1994).iso
/
Science
/
RLaB
/
toolbox
/
banner.r
< prev
next >
Wrap
Text File
|
1994-04-25
|
734b
|
38 lines
//-------------------------------------------------------------------
//
// banner
//
// Syntax: banner(string)
//
// Prints the string in the center of the page with horizontal
// lines above and below
//
// Originally written for MATLAB by Lee P. Peterson
// Modified by Jeff Layton and ported to RLaB by Jeff Layton
//-------------------------------------------------------------------
rfile center
banner = function(string)
{
local(width,line,j)
if (string.class != "string") {
error("banner only works with strings.")
}
width=length(string);
line="";
for (j in 1:width) {
line=line+"-";
}
// printf("%s"," ");
center(line);
center(string);
center(line);
// printf("%s"," ");
};